using System.Collections.Generic;
using Godot;

public class Xiang : IEntity
{
    public List<Vector2I> GetNextPos(Game game, int team, Vector2I current)
    {
        var ans = new List<Vector2I>();
        foreach (var rel in Rule.DIAGONAL_MOVEMENT)
        {
            var middle = current + rel;
            if (Rule.OnBoard(middle) && game.entitySlot[middle.X, middle.Y] == null)
            {
                var next = middle + rel;
                if (Rule.OnBoard(next) && game.entitySlot[next.X, next.Y]?.team != team)
                    ans.Add(next);
            }
        }
        return ans;
    }
}